Skip to content

feat(audience): auto-collect Epic account ID and detect Epic platform#799

Merged
nattb8 merged 1 commit into
mainfrom
feat/sdk-535-epic-account-id
Jun 24, 2026
Merged

feat(audience): auto-collect Epic account ID and detect Epic platform#799
nattb8 merged 1 commit into
mainfrom
feat/sdk-535-epic-account-id

Conversation

@nattb8

@nattb8 nattb8 commented Jun 23, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Auto-collects the player's Epic account ID at Init and fires an identify event with identity_type='epic'
  • Sets distribution_platform='epic' in game_launch when the game is launched from EGS (detected via -EpicPortal / -epicapp= / -epicenv= CLI args)

Detection uses C# reflection — no hard compile-time dependency on the EOS plugin. Games without EOS are unaffected. Both install methods supported:

  • UPM package (com.playeveryware.eos / com.Epic.OnlineServices assembly)
  • Legacy DLL install (EOSSDK / PlayEveryWare.EpicOnlineServices assembly)

Test plan

  • Launched from Steam only — distribution_platform='steam' and identity_type='steam' set correctly
  • Launched from EGS only — distribution_platform='epic' and identity_type='epic' set correctly
  • Game available on both stores, launched from Steam — platform correctly set to steam, not epic
  • Verify no events fire / no errors when EOS plugin is absent

🤖 Generated with Claude Code

@nattb8 nattb8 requested review from a team as code owners June 23, 2026 07:58
@nattb8 nattb8 force-pushed the feat/sdk-535-epic-account-id branch 4 times, most recently from 0f2f46e to 31cef5e Compare June 24, 2026 03:21
When the PlayEveryWare EOS Unity plugin is present, the SDK now:
- Calls Identify() with the logged-in EpicAccountId automatically at Init
- Sets distribution_platform = "epic" in game_launch properties when
  the game was launched from the Epic Games Store

Detection uses C# reflection so there is no hard compile-time dependency;
games without EOS are completely unaffected. Both EOS Unity plugin install
methods are supported:
  - UPM package (com.playeveryware.eos / com.Epic.OnlineServices assembly)
  - Legacy DLL install (EOSSDK / PlayEveryWare.EpicOnlineServices assembly)

EGS detection is based on launcher-injected CLI args (-EpicPortal,
-epicapp=, -epicenv=), not EOS initialisation, so Steam-only games that
use EOS for cross-play are not misattributed.

link.xml: type-level preserve="all" entries for AuthInterface and
EpicAccountId prevent IL2CPP High stripping from removing the method
metadata that reflection depends on. Assembly-level preserve="all" only
protects type declarations, not method bodies or their metadata.
examples/audience/Assets/link.xml mirrors the same rules because Unity's
linker skips package link.xml when the package is a file: path (dev mode).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@nattb8 nattb8 force-pushed the feat/sdk-535-epic-account-id branch from 31cef5e to 17836b1 Compare June 24, 2026 03:25
@nattb8 nattb8 enabled auto-merge June 24, 2026 05:55
@nattb8 nattb8 merged commit 0abb5b0 into main Jun 24, 2026
63 of 73 checks passed
@nattb8 nattb8 deleted the feat/sdk-535-epic-account-id branch June 24, 2026 06:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

2 participants